
package urnoted;

public enum Note {
    C4(60, 172), 
    D4(62, 157), 
    E4(64, 142), 
    F4(65, 127), 
    G4(67, 112), 
    A5(69, 97), 
    B5(71, 82), 
    C5(72, 67), 
    D5(74, 52), 
    E5(76, 37), 
    F5(77, 22), 
    G5(79, 7);
    
    private final int pitch;  // number of pixels from top to this note
    private final int y;  // number of pixels from top to center of this note

    private Note(int pitch, int y) {
        this.pitch = pitch;
        this.y = y;
    }

    public static Note atIndex(int i) {
        return Note.values()[i];
    }

    public int getPitch() {
        return pitch;
    }

    public int getY() {
        return y;
    }
}
